package cn.gdpu.course.dao.impl;

import cn.gdpu.course.dao.AdminDao;
import cn.gdpu.course.dao.MybatisDao;
import cn.gdpu.course.dao.domain.Admin;
import org.springframework.stereotype.Repository;

import java.util.List;

/**
 * Created by Administrator on 2018/3/13.
 */
@Repository
public class AdminDaoImpl extends MybatisDao<Admin> implements AdminDao {
	public boolean save(Admin bean) {
		return this.insert("AdminMapper.insert",bean);
	}

	public boolean update(Admin bean) {
		return this.insert("AdminMapper.update", bean);
	}

	public boolean delete(Admin bean) {
		return this.insert("AdminMapper.delete", bean);
	}

	public List<Admin> find(Admin bean) {
		return this.queryForList("AdminMapper.select", bean);
	}

	public Admin findById(Admin bean) {
		return this.queryForObject("AdminMapper.selectById", bean);
	}

	public Admin findByAno(Admin bean) {
		return this.queryForObject("AdminMapper.selectByAno", bean);
	}
}
